﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:avaxo="clr-namespace:Avaxo.DlrPad">

    <Style x:Key="{x:Type avaxo:XamlTextBox}" TargetType="{x:Type avaxo:XamlTextBox}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="Margin" Value="5" />
        <Setter Property="AcceptsReturn" Value="True" />
        <Setter Property="AcceptsTab" Value="True" />
        
        <Style.Triggers>
            <Trigger Property="IsXamlValid" Value="True">
                <Setter Property="Foreground" Value="Black" />
            </Trigger>
            <Trigger Property="IsXamlValid" Value="False">
                <Setter Property="Foreground" Value="Red" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>